package com.lanxin.generator.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.ResourceLoader;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: 董伟豪
 * @Date: 2023/1/13 16:30
 */
@RestController
public class TestController {

    @Autowired
    private ResourceLoader resourceLoader;

    @GetMapping("/say")
    public String sayHello(){
        return "HelloWorld";
    }

    @GetMapping("/jar")
    public String testjar(){
        return resourceLoader.getResource("classpath:templates/api/template2.html").toString();
    }

}
